<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>some()</title>
	</head>
	<body>
		<script>
			// some() 方法用于检测数组中是否至少有一个元素满足测试函数
			// 有一个就行
			// 返回一个 Boolean 类型值

			let arr = [1, 3, 5, 7];
			let flag = arr.some((element) => element % 2 == 0);
			console.log(flag);
			flag = arr.some((element) => element > 5);
			console.log(flag);
		</script>
	</body>
</html>
